######################################################## 
## Mod Title:   Last Visit Admin Mod 
## Mod Version: 1.0.0 
## Author:       Niels Chr. Rd Denmark < ncr@db9.dk > 
## Description:  This mod is part 3, of a Last visit mod. 
## It will make it easyer for a administrator to control how 
## last visit is displayed, to people 
## Fetures in admin panel, board configuation: 
##   ability to enable/disable users to se other users Last logon time 
##   if this are disabled, admin persons wil though still be able to se 
##   the last logon time. 
## 
## This mod is only for phpBB2!! 
## 
## 
## Installation Level:  Easy 
## Installation Time:   5-10 Minutes 
## Files To Edit:      3 
##   phpBB2/Admin/admin_board.php 
##   phpBB2/language/lang_XX/lang_admin.php 
##   phpBB2/templates/template_dirXX/board_config_body.tpl    

######################################################## 
## 
## Installation Notes: 
## remember to include PART 1 and PART 2 before this mod 
## 
## The most important thing to keep in mind is, take your time, make 
## sure you are finding the correct lines to modify, then take care to paste the new code. 
## Please also keep in mind, if you are using more than one language file or theme at your 
## site, you will need to edit the correct files for each occurrence.  Good Luck! 
######################################################## 


# 
#-----[ ACTION ]------------------------------------------ 
# 
#  OPEN FILE:  phpBB2/admin/admin_board.php 
[FIND]: 

$prune_no = ( !$new['prune_enable'] ) ? "checked=\"checked\"" : ""; 

[ADD AFTER]: 

$hidde_last_logon_yes = ( $new['hidde_last_logon'] ) ? "checked=\"checked\"" : ""; 
$hidde_last_logon_no = ( !$new['hidde_last_logon'] ) ? "checked=\"checked\"" : ""; 

# 
#-----[ ACTION ]------------------------------------------ 
# 

[FIND]: 

"L_ENABLE_PRUNE" => $lang['Enable_prune'], 

[ADD AFTER]: 

"L_HIDDE_LAST_LOGON" => $lang['Hidde_last_logon'], 
"L_HIDDE_LAST_LOGON_EXPLAIN" => $lang['Hidde_last_logon_expain'], 

# 
#-----[ ACTION ]------------------------------------------ 
# 

[FIND]: 

"PRUNE_NO" => $prune_no, 

[ADD AFTER]: 

"HIDDE_LAST_LOGON_YES" => $hidde_last_logon_yes, 
"HIDDE_LAST_LOGON_NO" => $hidde_last_logon_no, 

################################### This completes the changes in admin_board.php ############################## 

# 
#-----[ ACTION ]------------------------------------------ 
# 
#  OPEN FILE:  phpBB2/language/lang_XX/lang_admin.php  (make sure to edit this file for every language your admin uses). 
#  AT THE BOTTOM OF THE PAGE 

[ADD]: 
//Added Last Visit mod 
$lang['Hidde_last_logon'] = "Hidde last logon time"; 
$lang['Hidde_last_logon_expain'] = "If this is set to yes, users last logon time, is hidden to other users ecxept administrators"; 


################################### This completes the changes in lang_admin.php ############################## 



# 
#-----[ ACTION ]------------------------------------------ 
# 
#  OPEN FILE:  phpBB2/templates/SubSilver/admin/board_config_body.tpl  (make sure to edit this file for every theme your admin uses). 

[FIND]: 

   <td class="row2"><input type="radio" name="prune_enable" value="1" {PRUNE_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="prune_enable" value="0" {PRUNE_NO} /> {L_NO}</td> 
</tr> 

[ADD AFTER]: 
<tr> 
   <td class="row1">{L_HIDDE_LAST_LOGON}<br /><span class="gensmall">{L_HIDDE_LAST_LOGON_EXPLAIN}</span></td> 
   <td class="row2"><input type="radio" name="hidde_last_logon" value="1" {HIDDE_LAST_LOGON_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="hidde_last_logon" value="0" {HIDDE_LAST_LOGON_NO} /> {L_NO}</td> 
</tr> 


################################### This completes the changes in board_config_body.tpl ############################## 

# that's all 
# admin part is now done 